<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<table>
    <tr>
        <td>
            <div>内容</div>
            <textarea wrap="60" rows="3" id="tarea1">
            12345
            </textarea>
            <br>
            <input type="button" value="复制" onclick="fuZhi(1)">
            <input type="button" value="粘贴" onclick="zhanTie(1)">
        </td>
        <td>
            <div>内容</div>
            <textarea wrap="60" rows="3" id="tarea2">

            </textarea>
            <br>
            <input type="button" value="复制" onclick="fuZhi(2)">
            <input type="button" value="粘贴" onclick="zhanTie(2)">
        </td>
    </tr>
</table>

<script>

    var arr = "";
    var elementById1 = document.getElementById("tarea1");
    var elementById2 = document.getElementById("tarea2");

    function fuZhi(obj) {
        switch (obj) {
            case 1 :
                arr = elementById1.value;
                break;
            case 2 :
                arr = elementById2.value;
                break;
        }

        alert(arr)
    }

    function zhanTie(obj) {
        switch (obj) {
            case 1 :
                elementById1.value = arr;
                break;
            case 2 :
                elementById2.value = arr;
                break;
        }
        alert(arr)
    }
</script>


</body>
</html>